﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sunny.Controls
{
	public class TableColumn : System.Windows.Controls.ColumnDefinition
	{
		private System.Windows.Style _ColumnStyle;
		public System.Windows.Style ColumnStyle
		{
			get
			{
				if (this._ColumnStyle == null)
				{
					this._ColumnStyle = new System.Windows.Style();
					this._ColumnStyle.TargetType = typeof(TableCell);
					this._ColumnStyle.Setters.Add(this.HorizontalAlignmentSetter);
					//this._ColumnStyle.Setters.Add(this.VerticalAlignmentSetter);
				}
				return this._ColumnStyle;
			}
		}

		private System.Windows.Setter _HorizontalAlignmentSetter;
		protected System.Windows.Setter HorizontalAlignmentSetter
		{
			get
			{
				if (this._HorizontalAlignmentSetter == null)
				{
					this._HorizontalAlignmentSetter = new System.Windows.Setter();
					this._HorizontalAlignmentSetter.Property = TableCell.HorizontalContentAlignmentProperty;
					this._HorizontalAlignmentSetter.Value = System.Windows.HorizontalAlignment.Stretch;
				}
				return this._HorizontalAlignmentSetter;
			}
		}

		/// <summary>
		/// The horizontal alignment of the cells of the column.
		/// </summary>
		[System.ComponentModel.DefaultValue(System.Windows.HorizontalAlignment.Stretch)]
		public System.Windows.HorizontalAlignment HorizontalAlignment
		{
			get
			{
				return (System.Windows.HorizontalAlignment)this.HorizontalAlignmentSetter.Value;
			}
			set
			{
				this.HorizontalAlignmentSetter.Value = value;
			}
		}

		//private System.Windows.Setter _VerticalAlignmentSetter;
		//protected System.Windows.Setter VerticalAlignmentSetter
		//{
		//    get
		//    {
		//        if (this._VerticalAlignmentSetter == null)
		//        {
		//            this._VerticalAlignmentSetter = new System.Windows.Setter();
		//            this._VerticalAlignmentSetter.Property = TableCell.VerticalContentAlignmentProperty;
		//            this._VerticalAlignmentSetter.Value = System.Windows.VerticalAlignment.Stretch;
		//        }
		//        return this._VerticalAlignmentSetter;
		//    }
		//}

		///// <summary>
		///// The vertical alignment of the cells of the column.
		///// </summary>
		//[System.ComponentModel.DefaultValue(System.Windows.VerticalAlignment.Stretch)]
		//public System.Windows.VerticalAlignment VerticalAlignment
		//{
		//    get
		//    {
		//        return (System.Windows.VerticalAlignment)this.VerticalAlignmentSetter.Value;
		//    }
		//    set
		//    {
		//        this.VerticalAlignmentSetter.Value = value;
		//    }
		//}
	}
}